# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>

pkgname=ibus-typing-booster
pkgver=2.1.2
pkgrel=1
pkgdesc="Predictive input method for the IBus platform"
url="https://mike-fabian.github.io/ibus-typing-booster/"
arch=(any)
license=(GPL3 Apache)
depends=(ibus python-gobject python-dbus python-pyenchant m17n-lib sqlite)
makedepends=(git)
_commit=86ffcb59eafe763ac1bfc2d7ea849b93e6570860  # tags/2.1.2
source=("git+https://github.com/mike-fabian/ibus-typing-booster#commit=$_commit")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd $pkgname
  autoreconf -fvi
}

build() {
  cd $pkgname
  ./configure --prefix=/usr --libexec=/usr/lib/ibus
  make
}

package() {
  cd $pkgname
  make DESTDIR="$pkgdir" install

  cd "$pkgdir/usr/share/$pkgname/data"
  gzip -nf --best *.{txt,json} annotations{,Derived}/*.xml
}
